package day21_28.day27;

public class Solution {
    public int Add(int num1,int num2) {
        if (num2 == 0){
            return num1;
        }
        int num = 0 , cur = 0;
        while (num2 != 0){
            num = num1 ^ num2;
            cur = (num1 & num2) << 1;
            num1 = num;
            num2 = cur;
        }
        return num1;
    }
}
